import {request} from "./request";

export function userSignUpAPI( registerInfo ) {

    return request({
        url:'/api/user/signUp',
        method:'Post',
        data:{
            name:registerInfo.name,
            password:registerInfo.password,
            smsCode:registerInfo.smsCode,
        }

    })

}

export function userSignInAPI(userInfo) {

    return request({
        url:'/api/user/signIn',
        method:'Post',
        data:{
            name:userInfo.name,
            password:userInfo.password
        }
    })

}

export function clearAuthCookieAPI() {
    return request({
        url:'/api/user/clearAuthCookie'
    })
}
export function userSignOutAPI() {
    localStorage.removeItem('TOKEN')
}


export function userInfoAPI() {
    return request({
        url:'/api/user/getUserInfo'
    })
}
